#pragma once

#include <iostream>
#include <string>
#include <ctime>

#define INFO    1
#define WARNING 2
#define ERROR   3
#define FATAL   4

// 输入level肯定不希望带双引号，可以理解成level加上#将宏参数level变成对应的字符串，比如：LOG(INFO, "This is a demo"); 
#define LOG(level, message) Log(#level, message, __FILE__, __LINE__)

void Log(std::string level, std::string message, std::string file_name, int line)
{
    std::cout << "[" << level << "][" << time(nullptr) << "][" << message << "][" << file_name << "][" << line << "]"<<std::endl;
}
